package main

import (
	"gorm.io/gorm"
	"time"
)

type login struct {
	Username string `form:"username" json:"username" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

// User demo
type User struct {
	gorm.Model
	Username string `gorm:"primaryKey"`
	Password string
	IsStaff  bool
}

type Todo struct {
	gorm.Model
	ID       uint
	UserID   string
	User     User `gorm:"references:Username"`
	Desc     string
	Begin    time.Time
	End      time.Time
	Finished bool
	Public   bool
	Approved bool
}
